from classes import Renderable
from google.appengine.ext import webapp
from google.appengine.api import users

class CVCreator(webapp.RequestHandler, Renderable):
	def mk_cv_menu(self, rurl, href, text):
		hrclass = ""
		if rurl == href:
			hrclass="active"
		self.cv_menu.append({'href': href, 'class': hrclass, 'text': text})
		
	def get(self):
		data = {}
		self.cv_menu = []
		rurl = "/create/personal/"
		self.mk_cv_menu(rurl, "/create/personal/", "Personal Information")
		self.mk_cv_menu(rurl, "/create/employment/", "Desired Employment / Occupational Field")
		self.mk_cv_menu(rurl, "/create/work-experience/", "Work Experience")
		self.mk_cv_menu(rurl, "/create/education/", "Education and Training")
		self.mk_cv_menu(rurl, "/create/languages/", "Language(s)")
		self.mk_cv_menu(rurl, "/create/skills/", "Personal Skills and Competences")
		self.mk_cv_menu(rurl, "/create/additional/", "Additional Information and Annexes")
		self.mk_cv_menu(rurl, "/create/save/", "Save your CV")
		data["cv_menu"] = self.cv_menu
		self.render("create/index.html", data)
